package com.wuliu.system.service.impl;

import java.util.List;
import com.wuliu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.wuliu.system.mapper.SysAppletMenuMapper;
import com.wuliu.system.domain.SysAppletMenu;
import com.wuliu.system.service.ISysAppletMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 前端菜单Service业务层处理
 * 
 * @author realue
 * @date 2023-10-22
 */
@Service
public class SysAppletMenuServiceImpl extends ServiceImpl<SysAppletMenuMapper, SysAppletMenu> implements ISysAppletMenuService
{
    @Resource
    private SysAppletMenuMapper sysAppletMenuMapper;

    /**
     * 查询前端菜单
     * 
     * @param id 前端菜单主键
     * @return 前端菜单
     */
    @Override
    public SysAppletMenu selectSysAppletMenuById(Long id)
    {
        return sysAppletMenuMapper.selectSysAppletMenuById(id);
    }

    /**
     * 查询前端菜单列表
     * 
     * @param sysAppletMenu 前端菜单
     * @return 前端菜单
     */
    @Override
    public List<SysAppletMenu> selectSysAppletMenuList(SysAppletMenu sysAppletMenu)
    {
        return sysAppletMenuMapper.selectSysAppletMenuList(sysAppletMenu);
    }

    /**
     * 新增前端菜单
     * 
     * @param sysAppletMenu 前端菜单
     * @return 结果
     */
    @Override
    public int insertSysAppletMenu(SysAppletMenu sysAppletMenu)
    {
        sysAppletMenu.setCreateTime(DateUtils.getNowDate());
        return sysAppletMenuMapper.insertSysAppletMenu(sysAppletMenu);
    }

    /**
     * 修改前端菜单
     * 
     * @param sysAppletMenu 前端菜单
     * @return 结果
     */
    @Override
    public int updateSysAppletMenu(SysAppletMenu sysAppletMenu)
    {
        sysAppletMenu.setUpdateTime(DateUtils.getNowDate());
        return sysAppletMenuMapper.updateSysAppletMenu(sysAppletMenu);
    }

    /**
     * 批量删除前端菜单
     * 
     * @param ids 需要删除的前端菜单主键
     * @return 结果
     */
    @Override
    public int deleteSysAppletMenuByIds(Long[] ids)
    {
        return sysAppletMenuMapper.deleteSysAppletMenuByIds(ids);
    }

    /**
     * 删除前端菜单信息
     * 
     * @param id 前端菜单主键
     * @return 结果
     */
    @Override
    public int deleteSysAppletMenuById(Long id)
    {
        return sysAppletMenuMapper.deleteSysAppletMenuById(id);
    }
}
